package org.baiyun.kaka.dao.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseDaoImpl {
	@Autowired//自动装配
	private SessionFactory sessionFactory;//hibernate的连接工厂
	
	//获取当前线程的hibernate的session
	//获取一个hibernate的数据库连接 
	protected Session getCurrentSession() 
	{
		return this.sessionFactory.getCurrentSession();
	}
	
	
	
}
